package com.etc.web;

import com.etc.dao.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by MZP on 2018/6/17.
 */
@Controller
public class TestController {

    @Autowired private AdminMapper adminMapper;
    @Autowired private Leave_paperMapper leave_paperMapper;
    @Autowired private PublictellMapper publictellMapper;
    @Autowired private StudentMapper studentMapper;
    @Autowired private TeacherMapper teacherMapper;
    @Autowired private User_attendanceMapper user_attendanceMapper;
    @Autowired private User_classMapper user_classMapper;

    @RequestMapping(value = "/test")
    public void test() {
//        adminMapper.findByUsername("admin");
//        adminMapper.findByUsernameAndPassword("13711478010", "136500");

//        leave_paperMapper.findByStudentNumberAndClassnode("201506110163"
//                , "SEDMNJDY");
//        leave_paperMapper.findByTeacherNameAndStatusAndClassnode("何文海"
//                , "已审核", "SEDMNJDY");
//        leave_paperMapper.findFirstById(3);

//        publictellMapper.findByClassnode("SEDMNJDY");
//
//        studentMapper.findAllByNameAndUsername("王晓峰", "st1");
//        studentMapper.findById(1);
//        studentMapper.findByUsername("st2");
//        studentMapper.findByUsernameAndPassword("201506110159", "123456");
//        studentMapper.findFirstByUsername("st2");
//        studentMapper.findFirstByStudentnumber("201506110164");
//        studentMapper.findAll(); //
//
//        teacherMapper.findByUsername("one");
//        teacherMapper.findByUsernameAndPassword("one", "136500");
//        teacherMapper.findFirstByUsername("three");
//        teacherMapper.findAll(); //
//
//        user_attendanceMapper.findAllByAttendanceAndClassnode("12018-05-07"
//                , "SEDMNJDQ");
//        user_attendanceMapper.findAllByNameAndClassnode("黎文婷", "SEDMNJDQ");
//        user_attendanceMapper.findAllByUsernameAndClassnode("one", "SEDMNJDY");
//        user_attendanceMapper.findAllByUsernameAndClassnodeOrderByIdAsc("17724247965"
//                , "SEDMNJDQ"); //
//        user_attendanceMapper.findAllByClassnode("SEDMNJDQ"); //
//        user_attendanceMapper.findAllByNameAndClassnodeOrderByIdAsc("黎文婷"
//                , "SEDMNJDQ"); //
//
//        user_classMapper.findAllByClassnode("SEDMNJDY");
//        user_classMapper.findAllByUsertypeAndClassnode("老师", "SEDMNJDY");
//        user_classMapper.findByClassnodeAndUsertype("SEDMNJDY", "学生");/**/
//        user_classMapper.findByUsername("one");
//        user_classMapper.findByUsertype("老师");
//        user_classMapper.findFirstByClassnode("SEDMNJDY");
//        user_classMapper.findByUsernameAndClassnode("one", "SEDMNJDY");
//        user_classMapper.findFirstByClassnodeAndUsertype("IMIFUXKN", "老师");

        return;
    }

}
